package com.enjoyor.soa.traffic.util.enums.ejcds;

/**
 * 警情状态枚举
 * @author enjoyor
 *
 */
public enum EnumMainStatus {
	/**
	 * 已接警
	 */
	NEWEVENT("ALARMSTATUS01", "已接警"),
	/**
	 * 已派发
	 */
	SENDED("ALARMSTATUS03", "已派发"),
	/**
	 * 已受理
	 */
	ACCEPTED("ALARMSTATUS04", "已受理"),
	/**
	 * 已派警
	 */
	DISPATCH("ALARMSTATUS07", "已派警"),
	/**
	 * 已出发
	 */
	DEPART("ALARMSTATUS08", "已出警"),
	/**
	 * 已到达
	 */
	ARRIVED("ALARMSTATUS09", "已到警"),
	/**
	 * 已处置
	 */
	DEALED("ALARMSTATUS10", "已处置"),
	/**
	 * 已反馈
	 */
	FEEDBACK("ALARMSTATUS11", "已反馈"),
	/**
	 * 已拒绝
	 */
	REFUSED("ALARMSTATUS02", "已拒绝"),
	/**
	 * 已完结
	 */
	FINISHED("ALARMSTATUS12", "已完结");

	private final String key;

	private final String value;

	private EnumMainStatus(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return this.key;
	}

	public String getValue() {
		return this.value;
	}

	public String toString() {
		return this.name();
	}
	public static EnumMainStatus getEnumByKey(String key)
	{
		for(EnumMainStatus eu: EnumMainStatus.values())
		{
			if(eu.getKey().equals(key))
			{
				return eu;
			}
		}
		return null;
	}
}
